#include <iostream>
#include "Vector.h"
#include "List.h"
#include "Reverse_iterator.h"

using namespace Myvector;
using namespace Mylist;
using std::cout;
using std::endl;
using std::cin;

void test_vector1()
{

    vector<int> v;
    v.push_back(1);
    v.push_back(2);
    v.push_back(3);
    v.push_back(4);
    v.push_back(5);


    vector<int>::iterator it = v.begin();
    while (it != v.end())
    {
        cout << *it << " ";
        ++it;
    }
    cout << endl;


    vector<int>::_reverse_iterator rit = v.rbegin();
    while (rit != v.rend())
    {
        cout << *rit << " ";
        ++rit;
    }
    cout << endl;

}

void test_list1()
{
    list<int> lt;
    lt.push_back(1);
    lt.push_back(2);
    lt.push_back(3);
    lt.push_back(4);
    lt.push_back(5);

    list<int>::iterator it = lt.begin();
    while (it != lt.end())
    {
        cout << *it << " ";
        ++it;
    }
    cout << endl;

    list<int>::_reverse_iterator rit = lt.rbegin();
    while (rit != lt.rend())
    {
        cout << *rit << " ";
        ++rit;
    }
    cout << endl;

    it = lt.begin();
    while (it != lt.end())
    {
        *it *= 2;
        ++it;
    }
    cout << endl;

    for (auto e : lt)
    {
        cout << e << " ";
    }
    cout << endl;
}

int main()
{
    test_vector1();
    test_list1();

	return 0;
}